package interface_test;


class Person {

    public void fun() {
        this.test();
    }

    protected Person test() {
        System.out.println("1.Person的test方法");
        return new Student();
    }
}
class Student extends Person {

    public Student test() {
        System.out.println("2.Student的test方法");
        return new Student();
    }
}
public class Test {
    public static void main(String[] args) {
        new Student().fun();
    }
}